<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>欢迎发帖</title>
<!--样式设置-->
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/static/plugins/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath } /static/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>

	<nav class="navbar navbar-default">
		<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->

			<div class="navbar-header" style="width: 100%">

				<div style="float: left;">
					<a class="navbar-brand" href="#" style="margin-left: 20px">
						java技术论坛 </a>
				</div>

				<div style="float: right;">

					<c:if test="${name!=null }">
						<a class="navbar-brand" style="font-size: 15px">${name }</a>
						<span class="navbar-brand">|</span>
						<a class="navbar-brand"
							href="${pageContext.request.contextPath }/login">切换帐号</a>
					</c:if>

					<c:if test="${name==null }">
						<a class="navbar-brand"
							href="${pageContext.request.contextPath }/login"
							style="font-size: 15px">登录</a>
						<span class="navbar-brand">|</span>
						<a class="navbar-brand"
							href="${pageContext.request.contextPath }/registe"
							style="font-size: 15px">注册</a>

					</c:if>

					<form class="navbar-form navbar-left" role="search">
						<div class="form-group">
							<input type="text" class="form-control" placeholder="Search">
						</div>
						<button type="submit" class="btn btn-default">收索</button>
					</form>
				</div>
			</div>

		</div>
		<div class="container">
			<div class="panel">
				<div class="panel panel-title">
					<ul class="nav navbar-nav">
						<li><a href="${pageContext.request.contextPath }/Mune">首页</a></li>
						<li><a href="#">精选话题</a></li>
						<li><a href="#">论坛帮助</a></li>

						<li class="active"><a
							href="${pageContext.request.contextPath }/post-bar">论坛贴吧 <span
								class="sr-only">(current)</span>
						</a></li>
					</ul>
				</div>
			</div>
		</div>
	</nav>


	<div class="container">
		<div class="row">
			<div class="col-12">

				<div class="panel panel-default center-block">

					<div class="panel-heading">
						<h3 class="panel-title">发表新帖</h3>
					</div>
					<div class="panel-body">

						<form action="${pageContext.request.contextPath }/Sendpost"
							class="form-horizontal" method="post">
							<table class="table table-bordered">
								<tr>
									<th>主题</th>
									<td>
									<label> 
									<input class="form-control"
											name="title" id="title" />
									<span>你还可以(输入20个字) 剩余:</span>
									<span id = "qq" style="color: red">20</span>
									</label>
									</td>
								</tr>
								<tr>
									<th>主题内容</th>
									<td><textarea class="form-control" cols="40"
											name="content" id="content" rows="20"></textarea>
										<div>
											<span>你可以输入1000个字符</span>
											<span id="qqq" style="color: red">100000</span>
										</div></td>
								</tr>
								<tr>
									<th>选择版块</th>
									<td>
									<select id="select_parent_forum" class="form-control"
										name="sid">
											<option value="">-选择大版块-</option>
											<c:forEach items="${requestScope.sections}" var="u"
												varStatus="section">
												<option value="${ u.sid }">${ u.title }</option>
											</c:forEach>
									</select> 
									<select id="select_child_forum" name="pid"
										class="form-control">
											<option value="">-选择小版块-</option>
											<c:forEach items="${requestScope.section}" var="p"
												varStatus="section">
												<option value="${p.sid}">${ p.title }</option>
											</c:forEach>
									</select> <label>请选择所要发帖的版块</label></td>
								</tr>
								<tr>
									<th>主题类型</th>
									<td><select id="select_parent_forum" class="form-control"
										name="ttid">
											<option value="">-选择类型-</option>
											<c:forEach items="${requestScope.topictype}" var="s">

												<option value="${s.ttid}">${s.title}</option>

											</c:forEach>
									</select> <label>请选择所要发帖的类型</label></td>
								</tr>
								<tr>
									<th>是否可见</th>
									<td><label class=" control-label">选择是否可见</label> <input
										name="replyVisible" type="radio" value="1">是 <input
										name="replyVisible" type="radio" value="2"
										style="margin-left: 50px;">否</td>

								</tr>
								<tr>
									<th>帖子分数</th>
									<td>给分 <select id="topic_point" name="point"><option
												value="0">0</option>
											<option value="50">50</option>
											<option value="100">100</option>
											<option value="150">150</option>
											<option value="200">200</option>
											<option value="250">250</option>
											<option value="300">300</option>
											<option value="350">350</option>
											<option value="400">400</option></select> <span id="min_point">0</span>-<span
										id="max_point">400</span> 当前可用分：200 <span
										style="margin-left: 5px;">积分不足将全额抵扣S币，结帖后系统返还本帖50%的可用分！</span>
										<a href="#">查看论坛积分策略，让你快速获得积分！</a></td>
								</tr>
								<tr>
									<th>&nbsp;</th>
									<td>
										<div class="btn_area">
											<input class="btn_b submit_load_icon" name="commit"
												type="submit" value="发表帖子" />
										</div>
										<ol class="notice">
											<li>这里发言，表示您接受了论坛的用户<a href="#">行为准则</a>。
											</li>
											<li>请对您的言行负责，并遵守中华人民共和国有关法律法规,尊重网上道德。</li>
											<li>转载文章请注明出处。如是商业用途请联系原作者。</li>
										</ol>
									</td>
								</tr>
							</table>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- 引入jQuery的js -->
	<script
		src=" ${pageContext.request.contextPath }/static/plugins/jquery-1.11.3.min.js"></script>
	<!-- 引入bootstrap的js -->
	<script
		src="${pageContext.request.contextPath }/static/plugins/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

		<script type="text/javascript">
		$(function() {
			
			$("#content").bind("input propertychange",function(){
				$("#qqq").text(1000 - $(this).val().length);	
			});	
			
			$("#title").bind("input propertychange",function(){
				$("#qq").text(20 - $(this).val().length);	
			})	
				
		}) 
	</script>


</body>
</html>